package main.java;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionContext;

public class LoginAction implements Action {
	private String user;
	private String pass;

	// user属性的setter和getter方法
	public void setUser(String user) {
		this.user = user;
	}

	public String getUser() {
		return this.user;
	}

	// pass属性的setter和getter方法
	public void setPass(String pass) {
		this.pass = pass;
	}

	public String getPass() {
		return this.pass;
	}

	public String execute() {
		ActionContext.getContext().getSession().put("user", getUser());
		return SUCCESS;
	}
}